package cn.dust.design.pattern.structural.proxy.db;

/**
 * @Author: dust
 * @Date: 2019/11/27 15:39
 */
public class DataSourceContexHolder {

    private static final ThreadLocal<String>CONTEXT_HOLDER=new ThreadLocal<String>();
    public static void  setDBType(String dbType){
        CONTEXT_HOLDER.set(dbType);
    }

    public static String getDBType(){
        return CONTEXT_HOLDER.get();
    }

    public static void clearDBType(){
        CONTEXT_HOLDER.remove();
    }

}
